/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.openams.server.service;

import java.util.Collection;
import javax.ejb.EJB;
import javax.jws.WebService;
import javax.ejb.Stateless;
import javax.jws.Oneway;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import org.openams.server.ejbs.DatasetTemplateBean;
import org.openams.server.entity.DatasetTemplate;

/**
 *
 * @author mike
 */
@WebService(serviceName = "DatasetTemplateService")
@Stateless()
public class DatasetTemplateService {
    @EJB
    private DatasetTemplateBean ejbRef;// Add business logic below. (Right-click in editor and choose
    // "Insert Code > Add Web Service Operation")

    @WebMethod(operationName = "addDatasetTemplate")
    @Oneway
    public void addDatasetTemplate(@WebParam(name = "author") String author, @WebParam(name = "name") String name, @WebParam(name = "description") String description) {
        ejbRef.addDatasetTemplate(author, name, description);
    }

    @WebMethod(operationName = "persist")
    @Oneway
    public void persist(@WebParam(name = "object") Object object) {
        ejbRef.persist(object);
    }

    @WebMethod(operationName = "getDatasetTemplates")
    public Collection<DatasetTemplate> getDatasetTemplates() {
        return ejbRef.getDatasetTemplates();
    }
    
}
